Get

Function

This API is used to get parameter for AI > Setup > Face Detection page.

Request Message

Table 1

ParameterRangeTypeDescription
channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”
The number of channels depends on the capabilities of the device.
string arrayEach array bit represents a channel with a string.
DVR/NVR need;
IPC only use CH1
page_type“ChannelConfig”,
“AlarmConfig”
stringThe data used to distinguish whether it is a channel configuration page or an alarm configuration page

Sample:

POST API/AI/Setup/FD/Get HTTP/1.1
{
    "version": "1.0",
    "data": {"page_type": "ChannelConfig"}
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
channel_infoJSON objectChannel Information JSON show as follow Table Table 3
page_type“ChannelConfig”
“AlarmConfig”
stringThe data used to distinguish whether it is a channel configuration page or an alarm configuration page
channel_maxintMaximum number of channels
agreed_to_agreementboolWhether to agree to the face protocol.
statement_file_namestringThe displayed face protocol file name.

Table 3

ParameterRangeTypeDescription
CH1Json ObjectJSON show as follow Table Table 4
Json Object
IP_CH1Json Object
Json Object
WIFI_CH1Json Object
Json Object

Table 4

ParameterRangeTypeDescription
status"Offline"
"Online"
“Nonsupport”
stringChannel online status, only for digital channels.
Note: When the channel is online, there is no such field
alarm_out“Local->1”…
”Local->x”
“IP_CH1->1”…
“IP_CH1->2”…
” IP_CHx->1”
” IP_CHx->2”
The number of channels depends on the capabilities of the device.
arrayAlarm output channel
Each array bit represents aalarm output channel with a string.
Camera::Local->1:open, null value: close
latch_time"5s","10s","20s","30s"stringAlarm output time Ipc value 5 10 20 30
record_enabletrue, falseboolRecording channel switching
record_channel“CH1”…”CH1x”
“IP_CH1”…
” IP_CH1x”
“WIFI_CH1”…”
arrayAlarm output channel
Channel alarm linkage switch.
post_recording"OFF","5s","10s","20s","30s"stringVideo delay time Ipc value 0 5 10 20 30
send_emailtrue, falseboolSend Email Switch
switchtrue, falseboolswitch,false: close true: open
snap_mode"RealTimeMode"
"OptimalMode"
"IntervalMode"
stringScreenshot mode,
intervalMode JSON show as follow Table Table 5
apply_mode"FrontalView"
"MultiAngle"
"Customize"
stringCustomize JSON show as follow Table Table 6
min_pixel32-1080intMinimum pixel value
max_pixel320-1080intMaximum pixel value
face_enhancetrue, falseboolFace_enhance switch
face_attributeboolFace_attribute switch
detection_mode"StaticMode"
"MotionMode"
stringDetection mode
iva_lines0 Don't draw a line
1 draw a line
intWhether there will be a line in the preview and playback
rule_infoObjectInformation JSON show as follow Table Table 7
snap_num"1"
"2"
"3"
"Unlimited"
stringNumber of screenshots
snap_frequencyintScreenshot interval, unit s/pic
roll_range0-180intThe following default value fields are only available in Range:
"default_value_frontal": frontal default value for mode
"default_value_multi":multi default value for mode
pitch_range0-180intThe following default value fields are only available in Range:
"default_value_frontal": frontal default value for mode
"default_value_multi":multi default value for mode
yaw_range0-180intThe following default value fields are only available in Range:
"default_value_frontal": frontal default value for mode
"default_value_multi":multi default value for mode
picture_quality0-100intThe following default value fields are only available in Range:
"default_value_frontal": frontal default value for mode
"default_value_multi":multi default value for mode
schedule_enableboolSchedule mode
ptz_operation_supportboolBall machine use supports ptz operation
ftp_picture_uploadboolSupports uploading pictures to ftp
picture_to_cloudboolSupports uploading pictures to cloud storage
ftp_video_uploadboolSupports uploading videos to ftp
video_to_cloudboolSupports uploading videos to cloud storage
light_linkageboolWhite light linkage alarm
enforcerlight_linkageboolRed and blue indicator linkage alarm
siren_linkageboolAlarm sound linkage alarm
http_listeningboolhttp event push
scheduleObjectThe following table is displayed, as shown in the following Table 5
default_timeout1-120000intSession timeout(range use)

Table 5

ParameterRangeTypeDescription
schedule_type"SendEmail"
"FtpPicUpload"
"CloudPicUpload"
"Record"
"AlarmOut"
"FtpVdUpload"
"CloudVdUpload"
"FloodLight"
"Siren"
"EnforcerLight"
stringSchedule type
weekObejctWeekly information is shown in the table Table 6

Table 6

ParameterRangeTypeDescription
day"Sun"
"Mon"
"Tue"
"Wed"
"Thu"
"Fri"
"Sat"
stringday
timeinttime

Table 7

ParameterRangeTypeDescription
rule_number1ObjectRule number 1,information JSON show as follow Table Table 8

Table 8

ParameterRangeTypeDescription
rule_type"A->B"
"B->A"
stringRule type
rule_kind"Rect"
"Line"
stringRule type
detection_range"FullScreen"
"Customize"
stringExamination range
rule_rectObjectRectangle,information JSON show as follow Table table 9
rule_lineObjectDraw a line,information JSON show as follow Table table 10
point_num[min:max]arrayThe number of points drawn in the area, minimum 3 points (min), maximum 8 points (max)

Table 9

ParameterRangeTypeDescription
x10-704shortx1 Coordinate points
y10-576shorty1 Coordinate points
x20-704shortx2 Coordinate points
y20-576shorty2 Coordinate points
x30-704shortx3 Coordinate points
y30-576shorty3 Coordinate points
x40-704shortx4 Coordinate points
y40-576shorty4 Coordinate points
x50-704shortx5 Coordinate points
y50-576shorty5 Coordinate points
x60-704shortx6 Coordinate points
y60-576shorty6 Coordinate points
x70-704shortx7 Coordinate points
y70-576shorty7 Coordinate points
x80-704shortx8 Coordinate points
y80-576shorty8 Coordinate points

Table 10

ParameterRangeTypeDescription
x10-704shortx1 Coordinate points
y10-576shorty1 Coordinate points
x20-704shortx2 Coordinate points
y20-576shorty2 Coordinate points

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {"channel_info": {"CH1": {
        "status": "Online",
        "switch": false,
        "face_attribute": false,
        "snap_mode": "OptimalMode",
        "snap_num": "1",
        "snap_frequency": 2,
        "apply_mode": "FrontalView",
        "roll_range": 30,
        "pitch_range": 30,
        "yaw_range": 45,
        "picture_quality": 100,
        "min_pixel": 64,
        "max_pixel": 640,
        "detection_mode": "StaticMode",
        "rule_info": {"rule_number1": {
            "detection_range": "FullScreen",
            "rule_kind": "Rect",
            "rule_line": {
                "x1": 322,
                "y1": 30,
                "x2": 322,
                "y2": 545
            },
            "rule_type": "A->B",
            "rule_rect": {
                "x1": 30,
                "y1": 30,
                "x2": 30,
                "y2": 545,
                "x3": 675,
                "y3": 545,
                "x4": 675,
                "y4": 30
            }
        }}
    }}}
}

Error Code

See Response Messages Body and Common error_code for more information.